package com.easy.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easy.common.bean.Customer;
import com.easy.common.bean.SysUser;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper extends BaseMapper<SysUser> {

    @Delete("delete from sys_user_role where user_id=#{userid}")
    int deleteUserRoleByUserID(@Param("userId") Integer userId);

    @Insert("insert into sys_user_role values (#{userId},#{roleId})")
    int insertUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
}
